import math


def is_prime(n: int) -> bool:
    for i in range(2, math.floor(math.sqrt(n)) + 1):
        if n % i == 0:
            return False
    return True


def main():
    s = 0
    for i in range(2, 1000000):
        if is_prime(i):
            s += i
    print(s)


if __name__ == "__main__": 
    main()
#  python -m cProfile -s time test01.py